﻿using System.Collections.Generic;
using System.Web.Optimization;
using System.Linq ;

namespace Sharp.WebBooter
{
    public class AppJsBundleOrderer : IBundleOrderer
    {
        public virtual IEnumerable<BundleFile> OrderFiles(BundleContext context, IEnumerable<BundleFile> files)
        {
            return files.OrderBy(x => x.IncludedVirtualPath.Length).ThenBy(x => x.IncludedVirtualPath);
        }
    }
}